package br.com.summoner.primefaces.view;

import javax.faces.bean.ManagedBean;
import javax.faces.bean.RequestScoped;
import javax.faces.context.FacesContext;  
import javax.faces.application.FacesMessage;
	  
	@ManagedBean(name="buttonBean")
	@RequestScoped
	public class ButtonBean {  
	      
	    public void salvar() {  
	        addMessage("Os dados foram salvos com sucesso");  
	    }  
	      
	    public void update() {  
	        addMessage("Data updated");  
	    }  
	      
	    public void delete() {  
	        addMessage("Data deleted");  
	    }  
	      
	    public void addMessage(String summary) {  
	        FacesMessage message = new FacesMessage(FacesMessage.SEVERITY_INFO, summary,  null);  
	        FacesContext.getCurrentInstance().addMessage(null, message);  
	    }  
	}  

